﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 坦克大战
{
    abstract class  GameObject
    {
        public int i高 { get; set; }
        public int i宽 { get; set; }
        public int X { get; set; }
        public int Y{ get; set; }

        public virtual void  画自身()
        {
            Graphics g = 游戏框架.g;
            g.DrawImage(得到图像(), X, Y);
        }
        public abstract Image 得到图像();
       
      


        public virtual void Update()
        {
            画自身();
        }
        public Rectangle 获得矩形()
        {
            Rectangle r = new Rectangle(X, Y, i宽, i高);
            return r;
        }


    }
}
